Optimal. Leaf size=80 \[ \frac {a^2 \tan (e+f x)}{f}+\frac {a (3 a+2 b) \tan ^3(e+f x)}{3 f}+\frac {(a+b) (3 a+b) \tan ^5(e+f x)}{5 f}+\frac {(a+b)^2 \tan ^7(e+f x)}{7 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3270, 380}
\begin {gather*} \frac {a^2 \tan (e+f x)}{f}+\frac {(a+b)^2 \tan ^7(e+f x)}{7 f}+\frac {(a+b) (3 a+b) \tan ^5(e+f x)}{5 f}+\frac {a (3 a+2 b) \tan ^3(e+f x)}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 380
Rule 3270
Rubi steps
\begin {align*} \int \sec ^8(e+f x) \left (a+b \sin ^2(e+f x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \left (1+x^2\right ) \left (a+(a+b) x^2\right )^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \left (a^2+a (3 a+2 b) x^2+(a+b) (3 a+b) x^4+(a+b)^2 x^6\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^2 \tan (e+f x)}{f}+\frac {a (3 a+2 b) \tan ^3(e+f x)}{3 f}+\frac {(a+b) (3 a+b) \tan ^5(e+f x)}{5 f}+\frac {(a+b)^2 \tan ^7(e+f x)}{7 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.36, size = 92, normalized size = 1.15 \begin {gather*} \frac {\left (48 a^2-16 a b+6 b^2+\left (24 a^2-8 a b+3 b^2\right ) \sec ^2(e+f x)+6 \left (3 a^2-a b-4 b^2\right ) \sec ^4(e+f x)+15 (a+b)^2 \sec ^6(e+f x)\right ) \tan (e+f x)}{105 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.37, size = 149, normalized size = 1.86
method | result | size |
derivativedivides | \(\frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (f x +e \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (f x +e \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (f x +e \right )\right )}{35}\right ) \tan \left (f x +e \right )+2 a b \left (\frac {\sin ^{3}\left (f x +e \right )}{7 \cos \left (f x +e \right )^{7}}+\frac {4 \left (\sin ^{3}\left (f x +e \right )\right )}{35 \cos \left (f x +e \right )^{5}}+\frac {8 \left (\sin ^{3}\left (f x +e \right )\right )}{105 \cos \left (f x +e \right )^{3}}\right )+b^{2} \left (\frac {\sin ^{5}\left (f x +e \right )}{7 \cos \left (f x +e \right )^{7}}+\frac {2 \left (\sin ^{5}\left (f x +e \right )\right )}{35 \cos \left (f x +e \right )^{5}}\right )}{f}\) | \(149\) |
default | \(\frac {-a^{2} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (f x +e \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (f x +e \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (f x +e \right )\right )}{35}\right ) \tan \left (f x +e \right )+2 a b \left (\frac {\sin ^{3}\left (f x +e \right )}{7 \cos \left (f x +e \right )^{7}}+\frac {4 \left (\sin ^{3}\left (f x +e \right )\right )}{35 \cos \left (f x +e \right )^{5}}+\frac {8 \left (\sin ^{3}\left (f x +e \right )\right )}{105 \cos \left (f x +e \right )^{3}}\right )+b^{2} \left (\frac {\sin ^{5}\left (f x +e \right )}{7 \cos \left (f x +e \right )^{7}}+\frac {2 \left (\sin ^{5}\left (f x +e \right )\right )}{35 \cos \left (f x +e \right )^{5}}\right )}{f}\) | \(149\) |
risch | \(\frac {4 i \left (105 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}-560 a b \,{\mathrm e}^{8 i \left (f x +e \right )}-105 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+840 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+280 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+210 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+504 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}-168 a b \,{\mathrm e}^{4 i \left (f x +e \right )}-42 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+168 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-56 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+21 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+24 a^{2}-8 a b +3 b^{2}\right )}{105 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) | \(199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 85, normalized size = 1.06 \begin {gather*} \frac {15 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{7} + 21 \, {\left (3 \, a^{2} + 4 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{5} + 35 \, {\left (3 \, a^{2} + 2 \, a b\right )} \tan \left (f x + e\right )^{3} + 105 \, a^{2} \tan \left (f x + e\right )}{105 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 108, normalized size = 1.35 \begin {gather*} \frac {{\left (2 \, {\left (24 \, a^{2} - 8 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{6} + {\left (24 \, a^{2} - 8 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 6 \, {\left (3 \, a^{2} - a b - 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 15 \, a^{2} + 30 \, a b + 15 \, b^{2}\right )} \sin \left (f x + e\right )}{105 \, f \cos \left (f x + e\right )^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 127, normalized size = 1.59 \begin {gather*} \frac {15 \, a^{2} \tan \left (f x + e\right )^{7} + 30 \, a b \tan \left (f x + e\right )^{7} + 15 \, b^{2} \tan \left (f x + e\right )^{7} + 63 \, a^{2} \tan \left (f x + e\right )^{5} + 84 \, a b \tan \left (f x + e\right )^{5} + 21 \, b^{2} \tan \left (f x + e\right )^{5} + 105 \, a^{2} \tan \left (f x + e\right )^{3} + 70 \, a b \tan \left (f x + e\right )^{3} + 105 \, a^{2} \tan \left (f x + e\right )}{105 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 15.14, size = 72, normalized size = 0.90 \begin {gather*} \frac {a^2\,\mathrm {tan}\left (e+f\,x\right )+\frac {{\mathrm {tan}\left (e+f\,x\right )}^7\,{\left (a+b\right )}^2}{7}+{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (\frac {3\,a^2}{5}+\frac {4\,a\,b}{5}+\frac {b^2}{5}\right )+\frac {a\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (3\,a+2\,b\right )}{3}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________